package com.hutao.manage.util;

import java.util.HashMap;
import java.util.Map;

public class MapUtil {
	
	public static String getStringTypeValueTrim(Map<String, Object> data, String key) {
		String value = null;
		if (null != data.get(key)) {
			try {
				value = ((String)data.get(key)).trim();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		
		return value;
	}
	
	
	public static void main(String[] args) {
		Map<String, Object> data = new HashMap<>();
		String a = "bb";
		data.put("a", a);
		System.out.println(getStringTypeValueTrim(data, "a"));
		
	}
	

}
